package com.tansun.easycare.rule.decisiontree.model;

import java.io.Serializable;
import java.util.List;

import com.tansun.easycare.rule.refemodel.entity.RuleReleModel;

/**
 * 决策树节点信息
 *
 * @author Lph
 */
public class DecisionSubNode implements Serializable, Comparable<DecisionSubNode> {


    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
     * 决策树名称
     */
    private String name;
    /**
     * 节点ID
     **/
    private String id;
    /***节点打开类型（open，close）***/
    private String type;
    /**
     * 父节点id
     **/
    private String pid;//父ID
    /**
     * 同级节点的排序
     **/
    private Integer num;//树节点排序用
    /**
     * 节点在第几层
     **/
    private int floor;//

    /***节点对应的规则条件信息****/
    private List<DecisionSubNodeItem> nodeItems;
    
    /***节点对应的规则条件信息,规则集版****/
    private String nodehtml;
    
    /**
     * 节点对应的规则输出信息
     ***/
    private List<DecisionSubNodeItem> resultItems;
    /**
     * true:叶子
     **/
    private String isLeaf;
    //扩展属性(用于决策表转决策树)

    private String controlValue;
    /**
     * 扩展用
     */

    private String extreId;
    
    private  String isReleModel;
    
    
    private List<RuleReleModel>  releModelItems;
    
    private String cfyResult;//获取分类结果

    
	public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public List<DecisionSubNodeItem> getNodeItems() {
        return nodeItems;
    }

    public void setNodeItems(List<DecisionSubNodeItem> nodeItems) {
        this.nodeItems = nodeItems;
    }

    public String getControlValue() {
        return controlValue;
    }

    public void setControlValue(String controlValue) {
        this.controlValue = controlValue;
    }

    public String getExtreId() {
        return extreId;
    }

    public void setExtreId(String extreId) {
        this.extreId = extreId;
    }

    public List<DecisionSubNodeItem> getResultItems() {
        return resultItems;
    }

    public void setResultItems(List<DecisionSubNodeItem> resultItems) {
        this.resultItems = resultItems;
    }

    public String getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(String isLeaf) {
        this.isLeaf = isLeaf;
    }

    @Override
    public int compareTo(DecisionSubNode o) {
        return this.getNum().compareTo(o.getNum());
    }

    public void initNode(DecisionSubNode node) {
        if (node.getNum() != null)
            this.setNum(node.getNum());
        this.setName(node.getName());
        this.setNodeItems(node.getNodeItems());
    }

    public int getFloor() {
        return floor;
    }

    public void setFloor(int floor) {
        this.floor = floor;
    }

	public String getIsReleModel() {
		return isReleModel;
	}

	public void setIsReleModel(String isReleModel) {
		this.isReleModel = isReleModel;
	}

	public List<RuleReleModel> getReleModelItems() {
		return releModelItems;
	}

	public void setReleModelItems(List<RuleReleModel> releModelItems) {
		this.releModelItems = releModelItems;
	}

	public String getNodehtml() {
		return nodehtml;
	}

	public void setNodehtml(String nodehtml) {
		this.nodehtml = nodehtml;
	}
	
	public String getCfyResult() {
		return cfyResult;
	}

	public void setCfyResult(String cfyResult) {
		this.cfyResult = cfyResult;
	}
	
}
